@set CC=cl /nologo /c /O1 /Ob2 /Oi /Os /Oy /GT /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /GF /Gm- /EHsc /MD /GS- /Gy /arch:SSE2 /fp:precise
@set LIB=lib /nologo /SUBSYSTEM:CONSOLE",5.0"
@set TRASH=_build/_trash
@set SRC=../..
@set BUILD=../../_build
@set OUT=../../_build/_bin

cd %TRASH%
%CC% %SRC%/crt1.c
%LIB% /NODEFAULTLIB /OUT:%OUT%/crt1.lib crt1.obj %BUILD%/msvcrt6.lib

del crt1.obj

%CC% /D "_USRDLL" %SRC%/crt1.c
%LIB% /NODEFAULTLIB /OUT:%OUT%/crt1dll.lib crt1.obj %BUILD%/msvcrt6.lib
cd %SRC%